
public class EnemyObject extends SpaceObject {

	private double moveSpeed = 75;
	GameMain game;
	public EnemyObject(GameMain game, String spr, int x, int y) {
		super(spr, x, y);
		
		this.game=game;
		yVel=-moveSpeed;
	}
	public void move(long del){
		
		if((xVel< 0)&&(x<10))
		{
			game.updateLogic();
		}
		
		if((xVel>0)&&(x>750)){
			game.updateLogic();
		}
	
		y+=1;
		y+=(del*yVel)/1000;
	}
	
	public void doLogic(){
		xVel=-xVel;
		
		if(y>570){
			game.notifyDeath();
		}
	}
	public void collidedWith(SpaceObject other) {
		
		
	}

}